package chiss.org.draft.ihs;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * <p>
 * Java class for Expression complex type.
 *
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 *
 * <pre>
 * &lt;complexType name="Expression">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="calculation" type="{urn:org.chiss:draft:ihs}string"/>
 *         &lt;element name="variant" maxOccurs="unbounded" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                 &lt;/sequence>
 *                 &lt;attribute name="key" type="{http://www.w3.org/2001/XMLSchema}string" />
 *                 &lt;attribute name="display" type="{http://www.w3.org/2001/XMLSchema}string" />
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Expression", propOrder = {"calculation", "variant"})
public class Expression {

    @XmlElement(required = true)
    protected chiss.org.draft.ihs.String calculation;
    @XmlElement(nillable = true)
    protected List<Expression.Variant> variant;

    /**
     * Gets the value of the calculation property.
     *
     * @return possible object is {@link chiss.org.draft.ihs.String }
     */
    public chiss.org.draft.ihs.String getCalculation() {
        return calculation;
    }

    /**
     * Sets the value of the calculation property.
     *
     * @param value allowed object is {@link chiss.org.draft.ihs.String }
     */
    public void setCalculation(chiss.org.draft.ihs.String value) {
        this.calculation = value;
    }

    /**
     * Gets the value of the variant property.
     *
     * <p>
     * This accessor method returns a reference to the live list, not a
     * snapshot. Therefore any modification you make to the returned list will
     * be present inside the JAXB object. This is why there is not a
     * <CODE>set</CODE> method for the variant property.
     *
     * <p>
     * For example, to add a new item, do as follows:
     *
     * <pre>
     * getVariant().add(newItem);
     * </pre>
     *
     *
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link Expression.Variant }
     */
    public List<Expression.Variant> getVariant() {
        if (variant == null) {
            variant = new ArrayList<Expression.Variant>();
        }
        return this.variant;
    }

    public void setVariant(List<Expression.Variant> variant) {
        this.variant = variant;
    }

    /**
     * <p>
     * Java class for anonymous complex type.
     *
     * <p>
     * The following schema fragment specifies the expected content contained
     * within this class.
     *
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *       &lt;/sequence>
     *       &lt;attribute name="key" type="{http://www.w3.org/2001/XMLSchema}string" />
     *       &lt;attribute name="display" type="{http://www.w3.org/2001/XMLSchema}string" />
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "")
    public static class Variant {

        @XmlAttribute
        protected java.lang.String key;
        @XmlAttribute
        protected java.lang.String display;

        /**
         * Gets the value of the key property.
         *
         * @return possible object is {@link java.lang.String }
         */
        public java.lang.String getKey() {
            return key;
        }

        /**
         * Sets the value of the key property.
         *
         * @param value allowed object is {@link java.lang.String }
         */
        public void setKey(java.lang.String value) {
            this.key = value;
        }

        /**
         * Gets the value of the display property.
         *
         * @return possible object is {@link java.lang.String }
         */
        public java.lang.String getDisplay() {
            return display;
        }

        /**
         * Sets the value of the display property.
         *
         * @param value allowed object is {@link java.lang.String }
         */
        public void setDisplay(java.lang.String value) {
            this.display = value;
        }

    }

}
